# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=eva
pkgver=0.3.0
pkgrel=0
pkgdesc="Calculator REPL, similar to bc(1)"
url="https://github.com/nerdypepper/eva"
license="MIT"
arch="all !s390x !riscv64" # limited by rust/cargo
makedepends="cargo"
source="https://github.com/nerdypepper/eva/archive/v$pkgver/eva-$pkgver.tar.gz
	minimize-size.patch
	"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/eva -t "$pkgdir"/usr/bin
}

sha512sums="
4bc9837645c8200426a9b52ccb6038a6aab800891c774f5defff515a2de888d2e48d35d4a940e2e6ad3924334b7e4b498ea0bddd7e8cf257d6cef39b1233a035  eva-0.3.0.tar.gz
654dc4c03b57dda1ae40c75ade906ad29272f68014dfff7a19e4fd10e130b3f8106e43584a4680cf43683e64127176cf588a79fe3f10185f8c2f5d06237e0ce8  minimize-size.patch
"
